function initialize() {
  
// Exibir mapa;
    var myLatlng = new google.maps.LatLng(-28.245304, -52.422592);
    var mapOptions = {
        zoom: 16,
        center: myLatlng,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    }
 
    // Exibir o mapa na div #mapa;
    var map = new google.maps.Map(document.getElementById("mapa"), mapOptions);
    
    var marker = new google.maps.Marker({
        position: new google.maps.LatLng(-28.245304, -52.422592),
        title: "Infinitta Móveis",
        map: map,
        icon: 'public/media/images/maps.png?1=1'
    });
}
function loadScript() {
  var script = document.createElement("script");
  script.type = "text/javascript";
  var key = 'AIzaSyCM3xEm5SLXvRhob2Gu2gYRRnj6dDIXV9s';
  script.src ="http://maps.googleapis.com/maps/api/js?key="+key+"&sensor=true_or_false&callback=initialize";
 
  document.body.appendChild(script);
}

window.onload = loadScript;

initialize();